# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

_name=kio
pkgname=${_name}5
pkgver=5.112.0
pkgrel=1
pkgdesc='Resource and network access abstraction'
arch=(loong64 x86_64)
url='https://community.kde.org/Frameworks'
license=(LGPL)
depends=(solid5 kjobwidgets5 kbookmarks5 libxslt kwallet5 ktextwidgets5 kded5)
makedepends=(extra-cmake-modules kdoctools5 doxygen qt5-tools qt5-doc)
optdepends=('kio-extras: extra protocols support (sftp, fish and more)'
            'kdoctools5: for the help kioslave'
            'kio-fuse: to mount remote filesystems via FUSE'
            'switcheroo-control: hybrid GPU support')
conflicts=("$_name<5.111")
replaces=("$_name<5.111")
groups=(kf5)
source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/$_name-$pkgver.tar.xz{,.sig})
sha256sums=('84b8531c077fe8854f9fa69f6d2c120b222bf8334c14c6734dc14a429103fb99'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

build() {
  cmake -B build -S $_name-$pkgver \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=ON
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}
